$(document).ready(function()
{
	/**
	* 初始化搜索区域
	*/
	$.initProv("#Store_Search_Province","#Store_Search_City");	
	var search_province=$('#Store_Search_Province');
	var search_city=$('#Store_Search_City');
	var search_year=$('#Store_Search_Year');	
	var search_title=$('#Store_Search_Title');		
	var search_button=$('#Store_Search_Button');		
	search_button.click(function()
	{
		if(search_province.val()=='-1'&&search_city.val()=='-1'&&search_year.val()=='-1'&&search_title.val()=='')
		{			
			search_province.focus();
			return false;
		}
		
		var location='/exec.php?action=ancillary_supply_list&type=search';
		{
			if(search_province.val()!='-1'){
				location=location+'&province='+search_province.val();
			}
			if(search_city.val()!='-1'){
				location=location+'&city='+search_city.val();				
			}
			if(search_year.val()!='-1'){
				location=location+'&year='+search_year.val();				
			}
			if(search_title.val()!=''){
				location=location+'&title='+encodeURI(search_title.val());
			}			
		}
		window.location=location;
		return false;
	});		
});